<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
</head>
<script src="/static/layui/layui.js"></script>
<!--<script src="${contextPath}/static/js/jquery.min.js"></script>-->
<body>
<div class="flex-container">
    <div class="flex-item-content">
        <form class="layui-form" action="" onsubmit="return false">
            <div class="layui-form-item">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-inline">
                    <input type="text" name="1plun" required lay-verify="required" placeholder="请输入账号"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="text" name="zx04ph" required lay-verify="required" placeholder="请输入密码"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">登录</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form;
        var $ = layui.jquery, layer = layui.layer;

        function openCaptcha() {
            layer.open({
                type: 2
                , id: 'captcha-layer' //防止重复弹出
                , title: false,
                closeBtn: 0,
                shadeClose: true,
                area: ['300px', '300px']
                // ,skin: 'yourclass'
                , content: ["/captcha/index","no"]
                , shade: 0 //不显示遮罩
                , yes: function () {
                    layer.closeAll();
                }
            });
        }

        form.on('submit(formDemo)', function (data) {
            // layer.msg(JSON.stringify(data.field));
            openCaptcha();
            return false;
        });
    });
</script>
</body>

<style>
    html, body {
        width: 100%;
        height: 100%;
        background-color: #92b8b1;
    }

    .flex-container {
        width: 100%;
        height: 100%;
        display: flex;
        background-color: #b2b892;
    }

    .flex-item-content {
        background-color: white;
        margin: auto;
        padding-top: 50px;
        padding-right: 50px;
        padding-bottom: 20px;
        text-align: center;
        border-radius: 10px;

    }
</style>
</html>